package com.rongke.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.rongke.utils.DateJsonDeserializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @PanicBuyingTime
 * @抢购时间(panic_buying_time)
 * @version : Ver 1.0
 */
@TableName("panic_buying_time")
public class PanicBuyingTime implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;

	@TableField(exist = false)
	private  String status;

	 @TableField(exist = false)
	private List<PanicBuyingGoods> panicBuyingGoodses;
	/**
	 * @备注:开始日期
	 * @字段:start_date DATETIME(19)
	 */
//	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date startDate;


	/**
	 * @备注:结束日期
	 * @字段:end_date DATETIME(19)
	 */
//	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date endDate;


	/**
	 * @备注:若为当日最后一次抢购，持续时间（分）
	 * @字段:duration INT(10)
	 */
	private Integer duration;


	public PanicBuyingTime(){
	}

	public PanicBuyingTime(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public List<PanicBuyingGoods> getPanicBuyingGoodses() {
		return panicBuyingGoodses;
	}

	public void setPanicBuyingGoodses(List<PanicBuyingGoods> panicBuyingGoodses) {
		this.panicBuyingGoodses = panicBuyingGoodses;
	}

	public void setStartDate(java.util.Date startDate) {
		this.startDate = startDate;
	}

	public java.util.Date getStartDate() {
		return this.startDate;
	}


	public void setEndDate(java.util.Date endDate) {
		this.endDate = endDate;
	}

	public java.util.Date getEndDate() {
		return this.endDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void setDuration(Integer duration) {
		this.duration = duration;
	}

	public Integer getDuration() {
		return this.duration;
	}
}
